//
//  DHFilterView.m
//  DHJPHotel
//
//  Created by DIANGHONG on 2018/5/22.
//  Copyright © 2018年 Apple. All rights reserved.
//

#import "DHEvaFilterView.h"
@interface DHEvaFilterView()
@property (weak, nonatomic) IBOutlet UIButton *badEvaButton;
@property (weak, nonatomic) IBOutlet UIButton *mEvaButton;
@property (weak, nonatomic) IBOutlet UIButton *goodEvaButton;

@end
@implementation DHEvaFilterView

+ (instancetype)filterViewWithFrame:(CGRect)frame
{
    UINib *nib = [UINib nibWithNibName:@"DHEvaFilterView" bundle:nil];
    DHEvaFilterView *v = [nib instantiateWithOwner:nil options:nil][0];
    v.frame = frame;
    return v;
}
- (void)setGCount:(int)gCount
{
    _gCount = gCount;
    
    [self.goodEvaButton setTitle:[NSString stringWithFormat:@"好评(%d)",gCount] forState:UIControlStateNormal];
}

- (void)setMCount:(int)mCount
{
    _mCount = mCount;
    [self.mEvaButton setTitle:[NSString stringWithFormat:@"中评(%d)",mCount] forState:UIControlStateNormal];
}
- (void)setBCount:(int)bCount
{
    _bCount = bCount;
    [self.badEvaButton setTitle:[NSString stringWithFormat:@"差评(%d)",bCount] forState:UIControlStateNormal];
}
- (void)awakeFromNib
{
    [super awakeFromNib];
    
  //  [self.delegate filterView:self DidSelectedButton:self.goodEvaButton];
    
}
- (IBAction)selectedFilterBtns:(UIButton *)sender
{
    [self.delegate filterView:self DidSelectedButton:sender];
}
@end
